import request from '@/utils/request'

// 查询考核模型列表
export function listModel(query) {
  return request({
    url: '/hrm/model/list',
    method: 'get',
    params: query
  })
}

// 查询考核模型详细
export function getModel(id) {
  return request({
    url: '/hrm/model/' + id,
    method: 'get'
  })
}

// 新增考核模型
export function addModel(data) {
  return request({
    url: '/hrm/model',
    method: 'post',
    data: data
  })
}

// 修改考核模型
export function updateModel(data) {
  return request({
    url: '/hrm/model',
    method: 'put',
    data: data
  })
}

// 删除考核模型
export function delModel(id) {
  return request({
    url: '/hrm/model/' + id,
    method: 'delete'
  })
}


// 添加指标 /hrm/relation/{ids}
export function addRelation(data) {
  return request({
    url: '/hrm/relation/update',
    method: 'post',
    data:data,
  })
}



// 删除指标/dev-api/hrm/relation/{ids}
export function delRelation(id) {
  return request({
    url: '/hrm/relation/' + id,
    method: 'delete'
  })
}



